package gzx.specialcomponents
{
	import spark.components.Group;
	import mx.events.ToolTipEvent;
	public class CalendarDayItem extends Group
	{
		private var lblBackText : spark.components.Label;
		private var lblDay : spark.components.Label;
		public function CalendarDayItem()
		{
			super();
			this.clipAndEnableScrolling = true;
			init_lblDay();
			init_lblBackText();
			this.mxmlContent = [lblDay, lblBackText];
		}
		public function set Day(value:int):void
		{
			lblDay.text = value.toString();
		}
		public function set BackText(value:String):void
		{
			lblBackText.text = value;
		}
		public function set DayColor(value:int):void
		{
			if(value>0)
			{
				lblDay.setStyle("color",value);
			}
		}
		public function set DaySize(value:int):void
		{
			if(value>0)
			{
				lblDay.setStyle("fontSize",value);
			}
		}
		
		private function init_lblDay():void
		{
			lblDay = new spark.components.Label();
			lblDay.x = 3;
			lblDay.y = 3;
			lblDay.setStyle("fontWeight", "bold");
			lblDay.setStyle("fontSize", 16);
			lblDay.id = "lblDay";
		}
		
		private function init_lblBackText():void
		{
			lblBackText = new spark.components.Label();
			lblBackText.percentWidth = 100.0;
			lblBackText.percentHeight = 100.0;
			lblBackText.alpha = 0.2;
			lblBackText.setStyle("verticalAlign", "middle");
			lblBackText.setStyle("textAlign", "center");
			lblBackText.setStyle("color", 12500670);
			lblBackText.setStyle("fontWeight", "bold");
			lblBackText.setStyle("fontSize", 24);
			lblBackText.id = "lblBackText";
		}

	}
}